<template>
  <el-row :gutter="20" class="sy">
    <el-col :span="12">
      日期：<el-date-picker v-model="kingDate" style="width: 70%"
                           :clearable="false"></el-date-picker>
      <el-button @click="synchronizationKing"  style="width: 20vw">推送到金蝶</el-button>
    </el-col>
  </el-row>
</template>

<script>
export default {
  name: "Kingdee",
  data(){
    return{
      kingDate:new Date(),
      form:{
        date:null,
        synchronizationDate:null
      }
    }
  },
  methods:{
    synchronizationKing(){
      this.form.synchronizationDate=this.kingDate
      this.form.date=this.kingDate
      axios.post("/synchronization/king",this.form).then(res=>{
        if(res.data.success){
          this.$tools.showMessage("同步成功！","success")
        }
      })
    }
  }
}
</script>

<style scoped lang="less">
.sy{
  .el-col{
    border:1px solid #cbccce;
    line-height: 10vh;
    height: 10vh;
  }
}
</style>
